package sfeir.ergosum.model;

import java.io.Serializable;

public class Address implements Serializable{

	private static final long serialVersionUID = 2148217685694226874L;
	public static final int PERSONAL_ADDRESS = 0x01;
    public static final int PROFESSIONNAL_ADDRESS = 0x02;
    public static final int DEFAULT_ADDRESS = 0xFF;

    private int type = DEFAULT_ADDRESS;
    
    private long _id;

    // Use this if the address cannot be exploded
    private String fullValue;

    // Not used yet... this come from vCard format. see rfc2426 at :
    // http://microformats.org/wiki/hcard-examples-fr
    private String streetAddress;
    private String postOfficeBox;
    private String extendedAddress;
    private String locality;
    private String region;
    private String postalCode;
    private String countryCode;
    private String countryName;
    
    public Address(String fullValue, int type) {
        this.fullValue=fullValue;
        this.type=type;
    }

    public Address(String fullValue) {
    	this.fullValue=fullValue;
	}

	public String toString() {
        return fullValue;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getFullValue() {
        return fullValue;
    }

    public void setFullValue(String fullValue) {
        this.fullValue = fullValue;
    }

    public String getStreetAddress() {
        return streetAddress;
    }

    public void setStreetAddress(String streetAddress) {
        this.streetAddress = streetAddress;
    }

    public String getPostOfficeBox() {
        return postOfficeBox;
    }

    public void setPostOfficeBox(String postOfficeBox) {
        this.postOfficeBox = postOfficeBox;
    }

    public String getExtendedAddress() {
        return extendedAddress;
    }

    public void setExtendedAddress(String extendedAddress) {
        this.extendedAddress = extendedAddress;
    }

    public String getLocality() {
        return locality;
    }

    public void setLocality(String locality) {
        this.locality = locality;
    }

    public long get_id() {
        return _id;
    }

    public void set_id(long _id) {
        this._id = _id;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getPostalCode() {
        return postalCode;
    }

    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }

    public String getCountryCode() {
        return countryCode;
    }

    public void setCountryCode(String countryCode) {
        this.countryCode = countryCode;
    }

    public String getCountryName() {
        return countryName;
    }

    public void setCountryName(String countryName) {
        this.countryName = countryName;
    }
}
